from PIL import Image

from PIL import Image
with Image.open("image.jpg") as im:
    im.rotate(45).show()

